﻿namespace rtgen_guiclient
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class ErrorReport : Form
    {
        private Button btnNo;
        private Button btnYes;
        private CheckBox cbRestart;
        private IContainer components;
        private Label label2;
        private TextBox txtError;

        public ErrorReport()
        {
            this.InitializeComponent();
        }

        private void btnNo_Click(object sender, EventArgs e)
        {
            if (this.cbRestart.Checked)
            {
                Application.Restart();
            }
            else
            {
                Application.Exit();
            }
        }

        private void btnYes_Click(object sender, EventArgs e)
        {
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(ErrorReport));
            this.label2 = new Label();
            this.btnYes = new Button();
            this.btnNo = new Button();
            this.txtError = new TextBox();
            this.cbRestart = new CheckBox();
            Label label = new Label();
            base.SuspendLayout();
            label.AutoEllipsis = true;
            label.AutoSize = true;
            label.Font = new Font("Microsoft Sans Serif", 14.25f, FontStyle.Regular, GraphicsUnit.Point, 0);
            label.Location = new Point(0x1b, 20);
            label.Name = "label1";
            label.Size = new Size(0x1b2, 0x18);
            label.TabIndex = 0;
            label.Text = "An error has occured in the DistrRTgen application";
            this.label2.AutoSize = true;
            this.label2.Location = new Point(13, 0x37);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x1ce, 13);
            this.label2.TabIndex = 1;
            this.label2.Text = "Do you want to allow the application to send info about the error back to freerainbowtables.com?";
            this.btnYes.DialogResult = DialogResult.OK;
            this.btnYes.Location = new Point(0xa6, 0x100);
            this.btnYes.Name = "btnYes";
            this.btnYes.Size = new Size(0x4b, 0x17);
            this.btnYes.TabIndex = 2;
            this.btnYes.Text = "Yes";
            this.btnYes.UseVisualStyleBackColor = true;
            this.btnYes.Click += new EventHandler(this.btnYes_Click);
            this.btnNo.DialogResult = DialogResult.Cancel;
            this.btnNo.Location = new Point(0xf7, 0x100);
            this.btnNo.Name = "btnNo";
            this.btnNo.Size = new Size(0x4b, 0x17);
            this.btnNo.TabIndex = 3;
            this.btnNo.Text = "No";
            this.btnNo.UseVisualStyleBackColor = true;
            this.btnNo.Click += new EventHandler(this.btnNo_Click);
            this.txtError.Location = new Point(15, 0x55);
            this.txtError.Multiline = true;
            this.txtError.Name = "txtError";
            this.txtError.ReadOnly = true;
            this.txtError.ScrollBars = ScrollBars.Vertical;
            this.txtError.Size = new Size(0x1cb, 0x8f);
            this.txtError.TabIndex = 4;
            this.cbRestart.AutoSize = true;
            this.cbRestart.Checked = true;
            this.cbRestart.CheckState = CheckState.Checked;
            this.cbRestart.Location = new Point(0xc0, 0xe9);
            this.cbRestart.Name = "cbRestart";
            this.cbRestart.Size = new Size(0x75, 0x11);
            this.cbRestart.TabIndex = 5;
            this.cbRestart.Text = "Restart DistrRTgen";
            this.cbRestart.UseVisualStyleBackColor = true;
            base.AcceptButton = this.btnYes;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.CancelButton = this.btnNo;
            base.ClientSize = new Size(0x1e8, 0x123);
            base.Controls.Add(this.cbRestart);
            base.Controls.Add(this.txtError);
            base.Controls.Add(this.btnNo);
            base.Controls.Add(this.btnYes);
            base.Controls.Add(this.label2);
            base.Controls.Add(label);
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            base.Name = "ErrorReport";
            this.Text = "Error Report";
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        public void SetError(string sErrorText)
        {
            this.txtError.Text = sErrorText;
        }
    }
}

